﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace KinectPG.LibraryTestGame
{
    public class GameObject
    {
        protected Vector2 Position;
        private float scale = 1.0f;
        private bool alive = false;
        protected Texture2D objectTexture;
        protected SpriteBatch SpriteBatch;

        public bool IsAlive 
        { 
            get 
            { 
                return alive; 
            } 
            set 
            { 
                alive = value; 
            } 
        }

        public Vector2 PositionVector
        {
            get
            {
                return Position;
            }
            set
            {
                Position = value;
            }
        }

        public Rectangle GetObjectBoundingBox
        {
            get
            {
                return new Rectangle((int)this.Position.X, (int)this.Position.Y, (int)(this.objectTexture.Width * this.scale), (int)(this.objectTexture.Height * this.scale));
            }
        }

        public float Scale
        {
            get
            {
                return scale;
            }
            set
            {
                scale = value;
            }
        }



        public GameObject(SpriteBatch sb)
        {
            this.SpriteBatch = sb;
        }

        public virtual void Draw(GameTime gameTime) { }

        public virtual void Update(GameTime gameTime) { }
    }
}
